import axios from 'axios'

const gitee = axios.create({
  baseURL: 'https://gitee.com/api/v5'
})
gitee.interceptors.response.use(
  (response) => response.data,
  function (error) {
    return Promise.reject(error)
  }
)

const owner = 'hellolyb',
  repo = 'ruoyi-boot'

export function reposCommits(params) {
  return gitee({
    url: `/repos/${owner}/${repo}/commits`,
    method: 'get',
    params
  })
}
